name = 'Python'
# print(name)
# print(name[0], name[3])
# print(name[-1], name[-3])

s = 'welcometochina'
print(s[-5:])   # 没有结束会到最后
print(s[:7])  # 从0开始可以省略
print(s[::2])

print(s[3:7])   # come
print(s[-7:-3])  # toch
print(s[3:-3]) # cometoch
print(s[3:-3:3])


